<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: Reception of CAN messages</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__CO__CAN__Message__reception.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Reception of CAN messages<div class="ingroups"><a class="el" href="group__CO__CANopen__301.html">CANopen_301</a> &raquo; <a class="el" href="group__CO__driver.html">Driver</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>Target specific definitions and description of CAN message reception.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__CANrx__t.html">CO_CANrx_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configuration object for CAN received message for specific <a class="el" href="group__CO__driver.html#CO_obj">CANopenNode Object</a>.  <a href="structCO__CANrx__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga23168979123a5ca8a87d49307eb2990e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__CAN__Message__reception.html#ga23168979123a5ca8a87d49307eb2990e">CANrx_callback</a> (void *object, void *rxMsg)</td></tr>
<tr class="memdesc:ga23168979123a5ca8a87d49307eb2990e"><td class="mdescLeft">&#160;</td><td class="mdescRight">CAN receive callback function which pre-processes received CAN message.  <a href="#ga23168979123a5ca8a87d49307eb2990e">More...</a><br /></td></tr>
<tr class="separator:ga23168979123a5ca8a87d49307eb2990e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Target specific definitions and description of CAN message reception. </p>
<p>CAN messages in CANopenNode are usually received by its own thread or higher priority interrupt. Received CAN messages are first filtered by hardware or by software. Thread then examines its 11-bit CAN-id and mask and determines, to which <a class="el" href="group__CO__driver.html#CO_obj">CANopenNode Object</a> it belongs to. After that it calls predefined <a class="el" href="group__CO__CAN__Message__reception.html#ga23168979123a5ca8a87d49307eb2990e" title="CAN receive callback function which pre-processes received CAN message. ">CANrx_callback()</a> function, which quickly pre-processes the message and fetches the relevant data. <a class="el" href="group__CO__CAN__Message__reception.html#ga23168979123a5ca8a87d49307eb2990e" title="CAN receive callback function which pre-processes received CAN message. ">CANrx_callback()</a> function is defined by each <a class="el" href="group__CO__driver.html#CO_obj">CANopenNode Object</a> separately. Pre-processed fetched data are later processed in another thread.</p>
<p>If <a class="el" href="group__CO__driver.html#CO_obj">CANopenNode Object</a> reception of specific CAN message, it must first configure its own <a class="el" href="structCO__CANrx__t.html" title="Configuration object for CAN received message for specific CANopenNode Object. ">CO_CANrx_t</a> object with the <a class="el" href="group__CO__driver.html#ga25ee22cd2e3a2f3bb49990e8bc3076b0" title="Configure CAN message receive buffer. ">CO_CANrxBufferInit()</a> function. </p>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga23168979123a5ca8a87d49307eb2990e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga23168979123a5ca8a87d49307eb2990e">&#9670;&nbsp;</a></span>CANrx_callback()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CANrx_callback </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>object</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>rxMsg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>CAN receive callback function which pre-processes received CAN message. </p>
<p>It is called by fast CAN receive thread. Each <a class="el" href="group__CO__driver.html#CO_obj">CANopenNode</a>Object" defines its own and registers it with <a class="el" href="group__CO__driver.html#ga25ee22cd2e3a2f3bb49990e8bc3076b0" title="Configure CAN message receive buffer. ">CO_CANrxBufferInit()</a>, by passing function pointer.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">object</td><td>pointer to specific <a class="el" href="group__CO__driver.html#CO_obj">CANopenNode Object</a>, registered with <a class="el" href="group__CO__driver.html#ga25ee22cd2e3a2f3bb49990e8bc3076b0" title="Configure CAN message receive buffer. ">CO_CANrxBufferInit()</a> </td></tr>
    <tr><td class="paramname">rxMsg</td><td>pointer to received CAN message </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Jun 9 2020 17:29:32 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
